<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航条的练习</title>
    <link rel="stylesheet" href="./css/reset.css">
    <style>
        /* 给导航条设置宽高和背景色 */
        .nav{
            width: 1500px;
            height: 60px;
            background-color: #E8E7E3;
            /* 方便查看 */
            margin: 100px auto;
        }
        .nav li{
            /* 设置li向左浮动 */
            float: left;
            /* 设置li高度，并使文字垂直居中 */
            height: 60px;
            line-height: 60px;
        }
        .nav a{
            /* 将超链接转换为块元素 */
            display: block;
            /* 去除下划线 */
            text-decoration: none;
            
            /* 设置文字的大小 */
            font-size: 18px;
            /* 设置间距 */
            padding: 0 60px;
        }
        .nav a:hover{
            background-color: #3F3F3F;
            color: #DCDBD7;
        }
        .nav li:last-child a{
            padding: 0 60px 0 62px;
        }
    </style>
</head>
<body>
    <div class="nav">
        <ul>
            <li>
                <a href="">HTML/CSS</a>
            </li>
            <li>
                <a href="">Browser Side</a>
            </li>
            <li>
                <a href="">Server Side</a>
            </li>
            <li>
                <a href="">Programming</a>
            </li>
            <li>
                <a href="">XML</a>
            </li>
            <li>
                <a href="">Web Building</a>
            </li>
            <li>
                <a href="">Reference</a>
            </li>
        </ul>
    </div>
</body>
</html>